home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / GEMFBIND / VQTNAME.S < prev    next >
Text File  |  1993-03-26  |  2KB  |  61 lines

  1. ;*========================================================================
  2. ;* VDIFAST Public Domain VDI bindings.
  3. ;*========================================================================
  4.  
  5.  
  6. ;*------------------------------------------------------------------------
  7. ;* Inquire font face name and index.
  8. ;*    09/01/91 v1.7
  9. ;*       Fixed vqt_name per M. Jaegermann's suggestions.  The length
  10. ;*       of the returned ADE string from contrl[4] is now used to
  11. ;*       build the return ascii string, since ADE strings are counted,
  12. ;*       not nullterm'd.  Also, made sure there was room for 33 chars
  13. ;*       of output in the intout array, due to the proposed fsmgdos
  14. ;*       change which adds an extra byte of return info to the string.
  15. ;*------------------------------------------------------------------------
  16.  
  17.           globl     _vqt_name
  18. _vqt_name:
  19. ;    .cargs    #8,handle.w,element.w,namestr.l
  20.  
  21. handle      =         8
  22. element   =         10
  23. namestr   =         12
  24.  
  25.           link        a6,#-68             ;* Allocate intout[34].
  26.  
  27. ;          VContrl    #130,,,#1
  28.           move.w    handle(a6),-(sp)    ; contrl[6]
  29.           clr.l     -(sp)                ; contrl[5,4]
  30.           move.w    #1,-(sp)            ; contrl[3]
  31.           subq.l    #2,sp                ; contrl[2]
  32.           clr.w     -(sp)                ; contrl[1]
  33.           move.w    #130,-(sp)            ; contrl[0]
  34.  
  35.           subq.l    #4,sp                ;* -> ptsout
  36.           pea        -68(a6)             ;* -> intout
  37.           subq.l    #4,sp                ;* -> ptsin
  38.           pea        element(a6)         ;* -> intin
  39.           pea        16(sp)                ;* -> contrl
  40.  
  41.           move.l    sp,d1
  42.           jsr        vditrap
  43.           lea        20(sp),sp            ;* clean off vdipb groodah.
  44.  
  45.           lea        -66(a6),a0            ;* Pointer to intout.
  46.           move.l    namestr(a6),a1        ;* Pointer to caller's string.
  47.           move.w    8(sp),d0            ;* load contrl[4]: outstr length.
  48.           subq.w    #1,d0                ;* account for intout[0] not copied.
  49. strloop:
  50.           move.w    (a0)+,d1            ;* Return normal string from
  51.           move.b    d1,(a1)+            ;* intout[1-34].  Copy low byte of
  52.           subq.w    #1,d0                ;* decrement string count.
  53.           bne.b     strloop             ;* each word to string byte.
  54.           clr.b     (a1)                ;* force nullterm onto string.
  55.  
  56.           move.w    -68(a6),d0            ;* retval intout[0] in d0.
  57.           unlk        a6
  58.           rts
  59.  
  60.           end
  61.